package sctu.edu.java.year2016.team02.wanggaowen.Pra;

import java.io.*;

/**
 * Created by 15c on 2016/6/5.
 */
public class Fil {
    public static void main(String[] args)throws IOException {
        File f = new File("E://去去去.txt");
        try {
            f.createNewFile();
            FileWriter fileWriter=new FileWriter(f);
            fileWriter.write("wanggaowen");
            fileWriter.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.print(f.length());

        System.out.print(f.getPath());


        try {
           FileReader fileReader1 = new FileReader(f);
            char[] by=new char[1024];
            int a=fileReader1.read(by);
            System.out.print(new String(by));
            fileReader1.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

    }

}